<!--
/**********************************************
 * 
 * File Name				:	addOrUpdateMenu.jsp
 * 
 * Last Changed Date		: 	$Date: 2010-03-31 16:08:31 +0800 (星期三, 31 三月 2010) $
 * 
 * Last Changed Revision	:	$Revision: 148 $
 * 
 * Last Changed Author		:	$Author: l101y1982j $
 * 
 * File Header URL			:	$HeadURL: svn://www.svnhost.cn/Busi-Building/code/branch/WebContent/com/busibuilding/administrate/sysmgmt/addOrUpdateMenu.jsp $
 * 
 * ********************************************
 */
-->
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/com/busibuilding/common/taglibs.jsp"%>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
	marginheight="0">
<!-- 
<s:form theme="simple" id="menuAddForm">
	<table width="100%" border="0" align="center">
		<tr>
			<td colspan="5">&nbsp;</td>
		</tr>
		<tr>
			<td style="padding-left: 10px; padding-right: 10px; vertical-align: top; width: 100%;" class="content">
			<table width="100%" border="0" cellpadding="0" cellspacing="0" >
				<tr>
					<td width="15%"></td>
					<td>
					<TABLE width="100%" class="wwFormTable"  border="0" cellpadding="5" cellspacing="5">
						<tr>
							<td colspan="5">&nbsp;</td>
						</tr>
						<tr>
							<td colspan="5" class="pageTitle" align="left">
								<table class="pageTitle">
									<tr>
										<td width="4%">&nbsp;
										</td>
										<td colspan="4" class="pageTitle">
											<font size="4" >
												<s:text name="admin.sysmgmt.menu.label.pageTitle" />
											</font>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td colspan="5">&nbsp;</td>
						</tr>
						<tr>
							<td width="8%">&nbsp;</td>
							<td colspan="4" class="compulsory"><s:text name="admin.loginPage.label.noteTips"/></td>
						</tr>
						<tr>
							<td colspan="5">&nbsp;</td>
						</tr>
						<tr>
							<td width="8%">&nbsp;</td>
							<td colspan="4">
								<span><s:actionerror /></span>
								<span><s:actionmessage/></span>
							</td>
						</tr>
-->						
<script type="text/javascript">
	function doUpdate(){
		var id = document.forms[0].menuId.value;
		if (id == ""){
			alert('<s:text name="general.message.selectRecord" />');
			return false;
		}else{
			MenuUtil.isParentMenu(id, function(status){
				if (eval(status)) {
					alert(status);
					//resubmit('menuAction_updateMenu.action','menuForm','')
				}else{
					alert(status);
				}
			});
					
			
		}
	}

	
</script>
<s:hidden name="addOrUpdateForm.menuId"/>
<s:hidden name="menuId"/>
<s:hidden name="version"/>
						<tr>
							<td colspan="5">&nbsp;</td>
						</tr>
						<tr>
							<td colspan="5">
								<table class="subTitle">
									<tr>
										<td width="4%" class="subTitle">&nbsp;
										</td>
										<td colspan="4" class="subTitle">
											<s:if test="showAddPage">
												<s:text name="admin.sysmgmt.menu.label.addMenu" />
											</s:if>
											<s:if test="showUpdatePage">
												<s:text name="admin.sysmgmt.menu.label.updateMenu" />
											</s:if>												
										</td>
									</tr>
								</table> 
								
							</td>
						</tr>
						<tr>
							<td colspan="5">&nbsp;</td>
						</tr>
						<tr>
							<td width="8%">&nbsp;</td>
							<td align="left" class="label" width="15%">
								<s:text name="admin.sysmgmt.menu.label.menuCode"/>:
								<s:text name="general.label.asterik" />	
							</td>
							<td colspan="3" align="left">
								<s:textfield name="addOrUpdateForm.menuCode" size="30" cssClass="smallTextbox"/><br>
								<s:fielderror>
										<s:param>addOrUpdateForm.menuCode</s:param>
								</s:fielderror>	
							</td>
						</tr>
						<tr>
							<td width="8%">&nbsp;</td>
							<td align="left" class="label" width="15%">
								<s:text name="admin.sysmgmt.menu.label.menuName"/>:
								<s:text name="general.label.asterik" />	
							</td>
							<td colspan="3" align="left">
								<s:textfield name="addOrUpdateForm.menuName" size="30" cssClass="smallTextbox"/><br>
								<s:fielderror>
									<s:param>addOrUpdateForm.menuName</s:param>
								</s:fielderror>	
							</td>
						</tr>
						<tr>
							<td width="8%">&nbsp;</td>
							<td align="left" class="label" width="15%">
								<s:text name="admin.sysmgmt.menu.label.menuType"/>:
								<s:text name="general.label.asterik" />	
							</td>
							
							<td colspan="3">
								<s:select list="menuTypeList" name="addOrUpdateForm.menuType" listKey="code" listValue="codeName"
								headerKey="" headerValue="---- 请选择菜单类型  ----"
								id="mType" cssClass="smallSelect"/><br>
								<s:fielderror>
									<s:param>addOrUpdateForm.menuType</s:param>
								</s:fielderror>
							</td>
						</tr>
						<tr>
							<td width="8%">&nbsp;</td>
							<td align="left" class="label" width="15%">
								<s:text name="admin.sysmgmt.menu.label.menuUrl"/>:
							</td>
							<td colspan="3" align="left">
								<s:textfield name="addOrUpdateForm.menuUrl" size="30" cssClass="smallTextbox"/>
							</td>
						</tr>
						<tr>
							<td width="8%">&nbsp;</td>
							<td align="left" class="label" width="15%">
								<s:text name="admin.sysmgmt.menu.label.menuDesc"/>:
							</td>
							<td colspan="3" align="left">
								<s:textfield name="addOrUpdateForm.menuDesc" size="30" cssClass="smallTextbox"/>
							</td>
						</tr>
						<tr>
							<td width="8%">&nbsp;</td>
							<td align="left" class="label" width="15%">
								<s:text name="admin.sysmgmt.menu.label.menuParent"/>:
							</td>
							
							<td colspan="3">
								<s:select list="parentMenuList" name="addOrUpdateForm.menuParentId" listKey="menuId" listValue="menuName"
								headerKey="" headerValue="---- 请选择所属的父菜单  ----"
								id="parentMenu" cssClass="smallSelect"/>
							</td>
						</tr>
						<tr>
							<td colspan="5">&nbsp;</td>
						</tr>
						<tr>
							<td colspan="5">&nbsp;</td>
						</tr>
						<tr>
							<td width="8%">&nbsp;</td>
							<td colspan="4" align="left">
								<s:if test="showAddPage">
									<input class="button" type="button" value='<s:text name="general.button.submit"/>' id="menuAddSubmitButton"
								onclick="resubmit('menuAction_createMenu.action','menuForm','')"/>
								</s:if>
								<s:if test="showUpdatePage">
									<input class="button" type="button" value='<s:text name="general.button.submit"/>' id="menuAddSubmitButton"
								onclick="doUpdate()"/>
								</s:if>	 
								
								<input class="button" type="reset" value='<s:text name="general.button.reset"/>' id="menuAddResetButton" />
							</td>
						</tr>
						<tr>
							<td width="8%">&nbsp;</td>
							<td align="left" class="label" width="15%">
								&nbsp;						
							</td>
							<td colspan="3" align="left">	
								&nbsp;		
							</td>
						</tr>
						<tr>
							<td colspan="5">&nbsp;</td>
						</tr>
<!-- 						
					</TABLE>
					</td>
					<td width="15%"></td>
				</tr>
			</table>
			</td>
		</tr>

	</table>
</s:form>
 -->
</body>